'''
json 保存 pyhon 基础数据类型可以  不支持复杂类型 类、函数等
可以适用不同的语言直接交换数据
'''
import json
'''
#write to file

dict ={'name':'lejia','age':'18'}

f_write = open(r'json_dict.txt','w')
ser_data = json.dump(dict,f_write)
f_write.close()
'''
#read from file

f_read = open(r'json_dict.txt','r')
original_data = json.load(f_read)
print(original_data)
print(type(original_data))

f_read.close()